{% extends "base.html.twig" %}
{% block head%}
{{parent()}}
{% endblock%}
{%block content%}
  <form action="practice/results/{{idlesson}}" method="post">
  <input type="hidden" value="{{idlesson}}" name="idlesson" />
{% for idquestion,question in questions %}
<fieldset>

{{loop.index}}.{% autoescape false%}{{question.text}}{% endautoescape %} (id = {{idquestion}})<br/>
{% for idanswer,answer in answers%}
    {%if idanswer == idquestion%}
    {% if question.needFullAns != 1%}
        {%for key,ans in answer%}
           <input id="{{idquestion}}_{{ans.idanswers}}" name="{{idquestion}}" type="radio" value="{{ans.answer}}"/>
            <label for="{{idquestion}}_{{ans.idanswers}}">{{ans.answer}}</label>
            <br/>
        {%endfor%}
        {%else%}
{#<textarea rows="20" cols="50" id="{{question['idquestion']}}_{{ans.idanswers}}">Введіть відповідь</textarea><br/>
         #}
        {%endif%}
    {%endif%}
{%else%}
 <h1> No answers !</h1>
{%endfor%}

</fieldset>
 {%else%}
 <h1> No questions !</h1>
{%endfor%}
<input type="SUBMIT" value="Отправить">
</form>
{%endblock%}